//
// Created by work on 24-6-6.
//

#ifndef IOT_PLAT_CRTMODELSIGBASE_H
#define IOT_PLAT_CRTMODELSIGBASE_H

#include <os/miscellany/CValue.h>

namespace iotplat {

    class CRtModelSigBase{
    public:
        enum ESigType {
            EYx,
            EYc,
            EYk,
            EParameter
        };

        enum EBaseSigCol {
            EModel_name,
            EUser,
            EName,
            EDescr,
            ESn,
            EGrouping,
            EConfigs
        };

        std::string model_name;
        std::string user;
        std::string name;
        std::string descr;
        int sn;
        std::string grouping;
        Json::Value configs;

        static std::map<CRtModelSigBase::EBaseSigCol, std::string> baseSigColToStringMap;
        static std::map<CRtModelSigBase::EBaseSigCol, CValue::EValueType> baseSigDataTypeByField;

    public:

        explicit CRtModelSigBase();

    public:

    };

#define BASE_SIG_ENUM CRtModelSigBase::EBaseSigCol
#define baseSigFieldName(type)          CRtModelSigBase::baseSigColToStringMap.find(type)->second
#define baseSigFieldType(type)          CRtModelSigBase::baseSigDataTypeByField.find(type)->second
} // iotplat

#endif //IOT_PLAT_CRTMODELSIGBASE_H
